//
//  ZJTodaySingWebViewController.m
//  ShangHaiHuDongApp
//
//  Created by ZJ on 2017/6/24.
//  Copyright © 2017年 刘应平. All rights reserved.
//

#import "ZJTodaySingWebViewController.h"

#define WEB_URL @"/WeChat/views/index_hd.html#/signIn_shibei/"

@interface ZJTodaySingWebViewController ()<UIWebViewDelegate>
/** webView */
@property (nonatomic, strong) UIWebView *webView;
@end

@implementation ZJTodaySingWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.titlelabel.text = @"签到";
    [self.view addSubview:self.webView];
    
    NSString *urlString = [NSString stringWithFormat:@"%@%@%@",HTMLURL,WEB_URL,[ZJUserInfoModel sharedUserInfo].ORG_ACCOUNT.ID];
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];
    [YJProgressHUD showMessage:@"加载中..." duration:10 view:self.view];
}



#pragma mark - UIWebView 协议方法
- (void)webViewDidFinishLoad:(UIWebView *)webView{
//    NSString *title = [webView stringByEvaluatingJavaScriptFromString:@"document.title"];
//    self.titlelabel.text = title;
    [YJProgressHUD hide];
}




#pragma mark - Getters

- (UIWebView *)webView{
    if (_webView == nil){
        _webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, LP_TopHeight, [UIScreen zj_screenWith], [UIScreen zj_screenHeight] - LP_TopHeight )];
        _webView.delegate = self;
        _webView.dataDetectorTypes = UIDataDetectorTypeAll;
        _webView.backgroundColor = [UIColor clearColor];
        [_webView setOpaque:YES];
    }
    return _webView;
}
@end
